package com.cjm.one.model.order.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.cjm.one.model.base.BaseEnum;
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum OrderStatusEnum implements BaseEnum {
    @JsonEnumDefaultValue
    WAIT_PAY(0, "待付款"),
    WAIT_DELIVER(1, "待发货"),
    ALREADY_DELIVER(2, "已发货"),
    WAIT_COMMENT(3, "待评价"),
    COMPLETED(4, "已完成"),
    REFUNDING(5, "退款中"),
    RETURN_REFUND(6, "退货退款中"),
    REFUNDED(7, "退款完成"),
    CANCEL(8, "已取消"),
    NO_RETURN_REFUND(9, "拒绝退款");

    @EnumValue
    @JsonValue
    private final int code;
    private final String message;

    OrderStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
